	<!-- BEGIN PAGE -->
	<div class="page-content">
         <!-- BEGIN PAGE CONTAINER-->        
         <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->
			<div class="row-fluid">
				<div class="span12"> 
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->	
						
					<h3 class="page-title">
						Pendataan Guru <small>pengaturan pendataan guru</small>
					</h3>
					<ul class="breadcrumb">
						<li>
							<i class="icon-cogs"></i>
							Guru dan Pelajaran
							<i class="icon-angle-right"></i>
						</li>
						<li>Pendataan Guru</li>	
					</ul>
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN PAGE CONTENT-->          
            <div class="row-fluid">
               <div class="span12">
			    <div class="portlet box blue">
                     <div class="portlet-title">
                        <div class="caption"><i class="icon-filter"></i>Penyaringan Data</div>
                     </div>
                     <div class="portlet-body flip-scroll">
						<form id="filter" action="" class="form-horizontal" method="post">
							 <div class="row-fluid">
								<div class="span4">
									<div class="control-group">
										<label class="control-label" >Departemen:</label>
										<div class="controls">
											<select class="span12 m-wrap" id="departemen" name="departemen" onchange='$("#filter").submit();'>
												<?php foreach($departemen->result_array() as $row){?>
												 <option value="<?php echo $row['departemen_id']?>" <?php echo $row['departemen_id'] == $departemen_id?'selected="selected"':'' ?>><?php echo $row['nama']?></option>
												<?php } ?>
											</select>
										</div>
									</div>
									
								</div>
								<div class="span4">
									<div class="control-group">
										<div class="controls">
											<a href="" class=""><i class=""></i></a>
										</div>
									</div>
									</div>
									<div class="span4">
									<div class="control-group">
										<div class="controls">
											<a href="<?php echo base_url()?>pendataanGuru/tampil/" class="btn red"><i class=""></i> TAMPILKAN SEMUA DATA ..</a>
										</div>
									</div>
									</div>
							</div>
							<div class="row-fluid">
							<div class="span4">
									<div class="control-group">
										<label class="control-label" >Kategori Rapor:</label>
										<div class="controls">
											<select class="span12 m-wrap" id="rapor" name="rapor" onchange='$("#filter").submit();'>
												<?php foreach($rapor->result_array() as $row){?>
												 <option value="<?php echo $row['kategori_rapor_id']?>" <?php echo $row['kategori_rapor_id'] == $rapor_id?'selected="selected"':'' ?>><?php echo $row['nama_rapor']?></option>
												<?php } ?>
											</select>
										</div>
									</div>
								</div>
								<div class="span4">
									<div class="control-group">
										<label class="control-label" >Pelajaran:</label>
										<div class="controls">
											<select class="span12 m-wrap" id="pelajaran" name="pelajaran" onchange='$("#filter").submit();'>
												<?php foreach($pelajaran->result_array() as $row){?>
												 <option value="<?php echo $row['pelajaran_id']?>" <?php echo $row['pelajaran_id'] == $pelajaran_id?'selected="selected"':'' ?>><?php echo $row['nama']?></option>
												<?php } ?>
											</select>
										</div>
									</div>
								</div>
								<div class="span4">
									<div class="control-group">
										<div class="controls">
											<input type="submit" class="btn blue btn-block" name="filter" value="SARING DATA"/>
										</div>
									</div>
								</div>
							</div>
						 </form>
                     </div>
                  </div>
                  <!-- BEGIN SAMPLE TABLE PORTLET-->
				  <?php if(isset($guru)){?>
                  <div class="portlet box blue">
                     <div class="portlet-title">
                        <div class="caption"><i class="icon-cogs"></i>Daftar Pendataan Guru</div>
						<div class="tools">
                           <a href="<?php echo base_url()?>pendataanGuru/form/<?php echo encode($departemen_id)."/".encode($pelajaran_id)."/".encode($rapor_id)?>" class="btn blue"><i class="icon-plus"></i> Tambah</a>
                        </div>
                     </div>
					 <div class="portlet-body flip-scroll">
                        <table class="table table-bordered table-striped table-condensed flip-content table-hover">
							<thead class="flip-content">
								<tr>
									<tr>
										<th align="center">No</th>
										<th align="center">Nip</th>
										<th align="center">Nama</th>
										<th align="center">Pelajaran</th>
										<th align="center">Status</th>
										<th align="center">Aktif</th>
										<th align="center">Keterangan</th>
										<th align="center">Aksi</th>
									</tr>
								</tr>
							</thead>
                           <tbody>
								<?php
									$c=0;
									foreach($guru->result_array() as $row){
										echo "<tr>";
										echo "<td>".($c=$c+1)."</td>";
										echo "<td>$row[nip]</td>";
										echo "<td>$row[nama]</td>";
										echo "<td>$row[nama_pelajaran]</td>";
										echo "<td>$row[status]</td>";
										echo "<td>$row[aktif]</td>";
										echo "<td>$row[keterangan]</td>";
										echo "<td align='center'>
										<a href=\"".base_url()."pendataanGuru/form/".encode($departemen_id)."/".encode($row['pelajaran_id'])."/".encode($row['kategori_rapor_id'])."/".encode($row['guru_id'])."\" title=\"Edit\" class=\"btn mini green\"><i class=\"icon-edit\"></i> Edit</a>
										<a href=\"".base_url()."pendataanGuru/delete/".encode($departemen_id)."/".encode($row['pelajaran_id'])."/".encode($row['kategori_rapor_id'])."/".encode($row['guru_id'])."\" title=\"Hapus\" class=\"btn mini red\" onClick=\"return confirm('Data akan dihapus. Lanjutkan ?')\"><i class=\"icon-trash\"></i> Hapus</a>
										</td>";
										echo "</tr>";
									}
									if($guru->num_rows() == 0){
										echo "<tr>";
										echo "<td colspan=8><div class=\"alert alert-error\">Tidak ada data Guru yang dipilih. Klik tombol tambah untuk menambahkan data.</div></td>";
										echo "</tr>";
									}
								?>
                           </tbody>
                       </table>
                     </div>
                  </div>
				   <?php }else if(isset($semua_guru)){ ?>
						<div class="portlet box blue">
                     <div class="portlet-title">
                        <div class="caption"><i class="icon-cogs"></i>Daftar Pendataan Guru</div>
						<div class="tools">
                          
                        </div>
                     </div>
					 <div class="portlet-body flip-scroll">
                        <table class="table table-bordered table-striped table-condensed flip-content table-hover">
							<thead class="flip-content">
								<tr>
									<tr>
										<th align="center">No</th>
										<th align="center">Nip</th>
										<th align="center">Nama</th>
										<th align="center">Pelajaran</th>
										<th align="center">Status</th>
										<th align="center">Aktif</th>
										<th align="center">Keterangan</th>
									</tr>
								</tr>
							</thead>
                           <tbody>
								<?php
									$c=0;
									foreach($semua_guru->result_array() as $row){
										echo "<tr>";
										echo "<td>".($c=$c+1)."</td>";
										echo "<td>$row[nip]</td>";
										echo "<td>$row[nama]</td>";
										echo "<td>$row[nama_pelajaran]</td>";
										echo "<td>$row[status]</td>";
										echo "<td>$row[aktif]</td>";
										echo "<td>$row[keterangan]</td>";
										echo "</tr>";
									}
									if($semua_guru->num_rows() == 0){
										echo "<tr>";
										echo "<td colspan=7><div class='alert alert-info'>Silahkan pilih departemen, kategori rapor, dan pelajaran lalu klik tombol <strong>SARING DATA</strong> untuk menampilkan data Guru</div></td>";
										echo "</tr>";
									}
								?>
                           </tbody>
                       </table>
                     </div>
                  </div>
				  
				  <?php }else{ ?>
						<div class="alert alert-info">Silahkan pilih Departemen, Kategori Rapor, dan Pelajaran lalu klik tombol <strong>SARING DATA</strong> untuk menampilkan data Guru</div>
					<?php }?>
					
					
                  <!-- END SAMPLE TABLE PORTLET-->
               </div>              
            </div>
           
            <!-- END PAGE CONTENT-->
         </div>
         <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
	<?php $this->load->view('template/messages'); ?>